A menu's xml definition consists of any number of nested groups. The names of these groups don't matter except for special names such as button and text. As soon as the parser finds one of those it creates the appropriate item.

Any xml group can contain parameters. If a parameter is missing, the parameter from the parent will be used. This means you can set parameters at a group level and they will be reused for all buttons (or sub groups) in that group.


Here is a list of keywords:

<button> will create a selectable button
<text> will create unselectable text
<credit> will create a credits text
<music> will create the song and active tracks from said song and start playing it within the menu


And here is a list of parameters:

(note that the screen dimensions are from something like (-1.77, -1) to (1.77, 1), so the height is 2. The width varies based on aspect ratio.)

os (string): this item will only show up in this os ("windows" or "playstation")
font (string): name of the font texture to use
itemheight (float): height of buttons/texts, compared to the screen
spacing (float): horizontal space between letters
leading (float): vertical space between items
position (float, float): position of the first button/text in the group. subsequent ones will be placed below this one
halign (left/center/right): horizontal alignment of items
valign (top/center/bottom): vertical alignment of items, note that this works kind of clunky when used with the automatic positioning, so best to stick to "top" when multiple buttons share a group
text (string): the text on the item
color (hex): color of the item
highlight (hex): color of the item when selected
text2 (string): additional text used for credit items
scale (float): (used for models, not text) the scale of the model, relative to its "native" scale
color1 (list of ints): first palette color for models
color2 (list of ints): second palette color for models
songname (string): name of the song we're playing
activetracks(list of ints): A list of comma seperated values denoting which tracks within the song should be audible


Here is an example menu:

<menu font="testfont" itemheight="0.2" spacing="0" color ="FFFFFF" highlight = "FF0000" leading="0" position="0, 0" halign = "center" valign = "center">
  <section>
    <button text="play"/>
    <button text="options" itemheight="0.15" />
    <button text="highscores" />
    <button text="credits" />
  </section>
  <section color = "0000FF" position = "0, 0.9" valign = "bottom">
    <text text="press X to eat a pie" highlight = "FFFF00"/>
  </section>
  <music songname = "w1l1" activetracks "0,1,2,3"/>
</menu>